//输出一个整数的每一位：例 1234 -> 1 2 3 4

import java.util.Scanner;

public class DIgui {
    public static void Print(int num)
    {
        if(num > 9)
            Print(num / 10);
        System.out.print((num % 10) + " ");
    }

    public static void main(String[] args) {
        int num = 0;
        Scanner sc = new Scanner(System.in);
        num = sc.nextInt();
        Print(num);
    }
}
